LotusScript Doc

LotusScript library: LSALibRecord

Options
Declare
Public

Uses
LSALibFct
LSALibMsgHAddr

Types
Public Node

Provides higher level functions to deal with teh LiSA serialized, textual object data as described in the LiSA-Interface reference manual

The steps to get the data are as follows
Dim DataList as Variant
Dim AttributeList List as String
Dim QueryValue as StringQuery
Serial Data = "#~#LotusP~Joe~D~Doe#LotusO~ACME"
' Create the data list of the test data with the standard function of LSALibRecord
Call CreateDataList(SerialData, DataList)
'
' get the value by logical position
QueryValue = GetValue(Query,"<LotusC>.1")
'
' create attribute mapping or get it from LiSA-Configure
AttributeList("GivenName")="<LotusC>.1"
AttributeList("FamilyName")="<LotusC>.2"
'...
' Create the mapped list with the standard function from LSALibRecord
MappingList = CreateMapping(AttributeList, DataList)
'
' get the value by logical name
QueryValue =MappingList( "GivenName")


Author:
LPS EMEA
Version:
2.0 02.NOV.2000
History:
02.NOV.2000EScReworked for docu standards


Method Summary
Sub CreateDataList (data As String, DataList List As Node)
Function CreateMapping (AttributeList List As String, DataList List As Node) As Variant
Function DisplayChildren (DataList List As Node, Pos As String) As String
Function DisplayList (DataList List As Node) As String
Function GetDelimiterString (SerialData As String, Delimiter As String) As Integer
Function GetPosition (Value As String, DataList List As Node) As String
Function GetValue (Query As String, DataList List As Node) As Variant
Function IsNonDelimiterText (TextToProof As String, Delimiter As Variant) As Integer
Function IsSerialData (SerialData As String) As Integer
Function SplitDelimiter (Delimiter As String) As Variant

Method Detail

GetValue

Public Function GetValue(Query As String,DataList List As Node) As Variant
Given a datalist this function returns the value of the node which is specified by the query parameter. The query specifies a position as defined by the serial data format. If the query cannot be found an error is thrown.
Example:
Let "#~#LotusP~Joe~D~Doe#LotusO~ACME" a serial data string and datalist the corresponding datalist.
value = GetValue("2.1", datalist) returns "Joe" value = GetValue(".2",datalist) returns "D"

Parameters:
QueryStringposition of the node for which value the function is looking
DataListListas Node the datalist in which the node is searched @returns Variant the value of the specific node or an error text starting with
Errors:
ErrWrongFormatthe query isn't of a proper format
ErrQueryNotFoundthe query couldn't be found
History:
13.JUN.2000RGRDocumentation created
Summmary Top

GetPosition

Public Function GetPosition(Value As String,DataList List As Node) As String
Returns the position of a block descriptor on the first level. E.g.
If "#~#LotusP~Joe~D~Doe#LotusO~ACME" is a serial data string with the corresponding datalist dList the call GetPostion("LotusP",dList) returns "2.0".

Parameters:
ValueStringdescriptor of the datablock
datalistListas Node datalist in which the position is searched @returns String the position of the node
History:
13.JUN.2000RGRDocumentation created
Summmary Top

DisplayList

Public Function DisplayList(DataList List As Node) As String
Computes a string representation of a datalist. This function will not be supported in future releases.

Parameters:
DataListListas Node the list datalist which should be represented by a string @returns String the representation
See also:
LSAWebLibRecord#DisplayChildren
History:
13.JUN.2000RGRDocumentation created
Summmary Top

DisplayChildren

Public Function DisplayChildren(DataList List As Node,Pos As String) As String
Helper function for function DisplayList. Creates recursively the representation of a subtree of a datalist. This function will not be supported in future releases.

Parameters:
DataListListas Node the list datalist which should be represented by a string
PosStringthe postion of the child which should be displayed @returns String the representation
See also:
LSAWebLibRecord#DisplayList
History:
13.JUN.2000RGRDocumentation created
Summmary Top

CreateMapping

Public Function CreateMapping(AttributeList List As String,DataList List As Node) As Variant
Given an attribute list and a datalist creates a new list which uses the names of the attribute list as keys and the corresponding node values of the data list as values.

Parameters:
AttributeListListas String a list with descriptions/names as keys and postions as values
DataListListas Node a list with positions as keys and values @returns Variant a List as String as joined list
History:
13.JUN.2000RGRDocumentation created
Summmary Top

CreateDataList

Public Sub CreateDataList(data As String,DataList List As Node)
Takes a serial data string, splits it into its components and builds a tree structure which allows easy acces to the values of the serial data string. This functionj is the heart of the library.

Parameters:
dataStringthe serial data string
datalistListas Node the tree structure which is returned (because List cannot be returned it is neccessary to pass in the value as paramter)
History:
13.JUN.2000RGRDocumentation created
Summmary Top

SplitDelimiter

Public Function SplitDelimiter(Delimiter As String) As Variant
Given a string with delimiter splits it into an array. This function is decapreared. Use VExplode of library LSALibFct.

Parameters:
DelimiterStringthe string which should be splitted
History:
13.JUN.2000RGRDocumentation inserted
Summmary Top

GetDelimiterString

Public Function GetDelimiterString(SerialData As String,Delimiter As String) As Integer
Given a serial data string, extracts the delimiter and returns true if the operation was successful.

Parameters:
SerialDataStringthe serial data string
DelimiterStringthe delimiters if an extraction was successful (this is a return value) @returns boolean true, if the delimiter string could be extracted
History:
13.JUN.2000RGRDocumentation inserted
Summmary Top

IsSerialData

Public Function IsSerialData(SerialData As String) As Integer
Checks if a string is a serial data string by checking if the rules for the delimiters are respected.

Parameters:
SerialDataStringthe string which should be scanned @returns booolean true, if the string is a serail data string
History:
13.JUN.2000RGRDocumentation inserted
Summmary Top

IsNonDelimiterText

Public Function IsNonDelimiterText(TextToProof As String,Delimiter As Variant) As Integer
Checks if delimiters are contained in a string. This function is used for validations.

Parameters:
TextToProofStringthe string which should be scanned
DelimiterVariantstring or array of strings containing the delimiters @returns boolean true, if none of the delimiters is containes in the string
History:
13.JUN.2000RGRDocumentation inserted
Summmary Top

TopLotusScript Doc
© Lotus Professional Services
generated on : 05-Apr-01 10:08:21 AM